<template>
  <SimpleHeader>
    <pan-task-list />
    <div class="group">
      <el-tooltip
        v-if="userboss"
        effect="dark"
        content="用户分组配置"
        placement="bottom"
      >
        <el-button
          size="small"
          icon="el-icon-user"
          @click="
            () => {
              this.$router.push({ path: '/group' });
            }
          "
        ></el-button>
      </el-tooltip>
    </div>
  </SimpleHeader>
</template>

<script>
import { mapGetters } from "vuex";
import PanTaskList from "../task-list";
import SimpleHeader from "../simple-header";

export default {
  name: "PanHeader",
  components: { PanTaskList, SimpleHeader },
  computed: {
    ...mapGetters(["userboss"]),
  },
};
</script>

<style>
.group {
  margin: 0 20px;
}
</style>
